package com.qiniuyun.threedgenerator.controller;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/test")
public class TestController {

    @GetMapping("/public")
    public ResponseEntity<String> publicTest() {
        return ResponseEntity.ok("✅ 公开接口测试成功！时间戳: " + System.currentTimeMillis());
    }

    @GetMapping("/private")
    public ResponseEntity<String> privateTest() {
        return ResponseEntity.ok("🔒 私有接口测试成功！时间戳: " + System.currentTimeMillis());
    }

    @PostMapping("/echo")
    public ResponseEntity<String> echo(@RequestBody String message) {
        return ResponseEntity.ok("📨 Echo: " + message + " | 时间戳: " + System.currentTimeMillis());
    }
}